<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/include/head.jsp"%>
<table id="dg" >
</table>
<script type="text/javascript">
	$(function() {
		initCurdDatagrid('product','dg',{
			title:'库存',
			baseUrl:'',
			dwidth:'90%',//弹出对话框的宽度 百分比或者具体数字宽度
			dheight:'90%',//弹出对话框的高度 百分比或者具体数字宽度
			btnCtl:'',
			loadFilter: function(data){
				return data;
			},
			remoteSort:false,
			showFooter:true,
			 pagination:false,//分页控件 
			url:'listProductSumInfo.do',
			columns:[[    
				        {field:'code',title:'产品编码',width:80,sortable:true},    
				        {field:'name',title:'产品名称',width:100,sortable:true},    
				        {field:'pprice',title:'进价',width:60,sortable:true,hidden:true},    
				        {field:'sprice',title:'售价',width:60,sortable:true},    
				        {field:'unit',title:'单位',width:50,sortable:true},    
				        {field:'spec',title:'规格',width:120,sortable:true,hidden:true},    
				        {field:'stuff',title:'材质',width:120,sortable:true,hidden:true},    
				        {field:'pName',title:'货品标题',width:100,sortable:true,hidden:true},  
				        {field:'inNum',title:'入库数量',width:50,sortable:true},
				        {field:'recvingNum',title:'待签收数量',width:50,sortable:true},
				        {field:'outNum',title:'出库数量',width:50,sortable:true},
				        {field:'sendingNum',title:'需求数量',width:50,sortable:true},
				        {field:'restNum',title:'总剩余数量',width:50,sortable:true},
				        {field:'totalPrice',title:'总金额',width:50,sortable:true},
				        {field:'status',title:'状态',width:50,sortable:true,formatter:function(value,row,index){
							if (value == 0){
								return '禁用';
							} else {
								return '启用';
							}
						}}    
				    ]] 
		},[]);

	});
	function btnSearchCancel()
	{
		$("#queryDialog").dialog('close');  
	}
	function btnSearch()
	{ 
		var param = $("#searchForm").serializeObject();
		param.status = $("#status").combobox('getValue');
		$('#dg').datagrid('load',param);
		$("#queryDialog").dialog('close');
	}
	
	function reloadData()
	{
		$('#dg').datagrid('reload');
	}
	
</script>

<%@include file="/include/foot.jsp"%>